package Cars.Controllers;

import Cars.Models.Bus;
import Cars.Models.Car;

public class BaseController {
    public static Object CreateObject(int Value){
        if (Value == 0) {
            return new Car();
        }else if (Value == 1) {
            return new Bus();
        }else{
            System.out.println("你输入的信息有误，请重新输入");
            return null;
        }
    }
}
